test(chat): NG0956 streaming regression guard (closes F6 gap)#723
Conversation
A component-level vitest that re-materializes the streaming-markdown @for collections (markdown-children list + markdown-table) across change-detection cycles and asserts no NG0956 — the regression class the atomic aimock e2e replay structurally cannot catch. Includes a negative control proving NG0956 is observable in this env; validated to fail if the @for reverts to track-by-identity. Test-only; closes the F6 NG0956 guard gap.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @blove's task in 2m 7s —— View job PR Review
SummaryTest-only PR adding a vitest component-level regression guard for NG0956 in streaming markdown. No production code changes. The test strategy is sound and the guard is well-constructed. LGTM. What the tests cover
All Review notesNegative control design (
Spy cleanup via No explicit
One observation: The table test exercises No bugs, no Angular/RxJS pitfalls, no type-safety issues found. The guard is proven to catch the regression (temporarily flipping to |
Summary
Closes the last open audit item — F6's missing regression guard. NG0956 ("tracking expression caused re-creation of the DOM structure") was fixed by switching the streaming-markdown
@fors totrack $index, but nothing protected that fix: the only coverage was the aimock e2e, which structurally can't fire NG0956 (it replays a message atomically, so the@fors render once and never re-materialize across change-detection cycles — an e2e console-guard there false-passes).This adds a component-level vitest that drives the re-materialization directly and asserts no NG0956. Test-only, no production change.
What it does
@fortracked by churning object identity; asserts NG0956 is captured. This proves the warning is observable in the vitest/jsdom env (the actual trigger turned out to be a fixed-length collection re-materialized with fresh identities each cycle — not a growing/reordering list).ChatStreamingMdComponent, feeds successive fixed-structure content (a 3-item list, then a 3-row table, with changing text) somarkdown-children/markdown-table@fors genuinely re-parse to fresh token objects, and asserts no NG0956.Validation
chattest+lint+build green.markdown-children's@forfromtrack $indextotrack child(identity) makes both positive guards fail with the real NG0956 message; reverting restores green. So the guard exercises the right code and isn't a hollow pass.🤖 Generated with Claude Code